<?php
class Aereolinea{
	var $id_aereolinea;
	var $nombre;
	var $logo="";


	function __construct()
	{	
		switch(func_num_args())
		{
			case 1:	if(trim(func_get_arg(0)) =="")return;
					$this->setId( func_get_arg( 0 ) );
					$this->cargar();
					break;
		}		
	}
	
	function cargar(){
		$con= new Conexion();
		$con->ejecutar("select * from aereolinea where id_aereolinea=".$this->getId());

		if($con->traerFilaPorNombre()){
			$this->setNombre($con->get('nombre'));
			$this->setLogo($con->get('logo'));
		}
	}
	
	function setId($_x){$this->id_aereolinea= $_x;}
	function setNombre($_x){$this->nombre= $_x;}
	function setLogo($_x){$this->logo= $_x;}

	function getId(){return $this->id_aereolinea;}
	function getNombre(){return $this->nombre;}
	function getLogo(){return $this->logo;}
}
?>